<?php
//Global variables
global $db, $user;


//Database
$db = new Database(DB_HOST, DB_NAME, DB_USER, DB_PASSWORD);

//User
if(isset($_SESSION['user']) && !empty($_SESSION['user'])){
	$user = User::getById($_SESSION['user']);
}

//Page name
$tmp = strrpos($_SERVER['PHP_SELF'], '/') + 1;
$pageName = substr($_SERVER['PHP_SELF'], $tmp, strlen($_SERVER['PHP_SELF']) - $tmp - 4 );
unset($tmp);

//Action form
$requestURI = $_SERVER['PHP_SELF'];

?>